<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="common/include :: header('新增员工')" />

</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
	<form class="form-horizontal m" id="form-employee-add">
		<div class="form-group">
			<label class="col-sm-3 control-label is-required">员工姓名：</label>
			<div class="col-sm-8">
				<input class="form-control" type="text" name="name" id="name" required>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label is-required">员工邮箱：</label>
			<div class="col-sm-8">
				<input class="form-control" type="text" name="email" id="email" required>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label is-required">员工年龄：</label>
			<div class="col-sm-8">
				<input class="form-control" type="text" name="age" id="age" required>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label">是否超管：</label>
			<div class="col-sm-8">
				<select name="admin" class="form-control m-b" th:with="type=${@dict.getType('bus_admin')}">
					<option th:each="dict : ${type}" th:text="${dict.label}" th:value="${dict.value}"></option>
				</select>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label is-required">入职时间：</label>
			<div class="col-sm-8">
				<input name="hiredate" class="form-control" type="text" required>
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label">所在部门：</label>
			<div class="col-sm-8">
				<select name="dept.id" class="form-control m-b" th:with="type=${@dept.list()}">
					<option value="">所在部门</option>
					<option th:each="depts : ${type}" th:text="${depts.name}" th:value="${depts.id}"></option>
				</select>
			</div>
		</div>

	</form>
</div>
<th:block th:include="common/include :: footer" />
<th:block th:include="common/include :: datetimepicker" />
<script type="text/javascript">
	var prefix = ctx + "/business/employee";
	function submitHandler() {
		if ($.validate.form()) {
			$.operate.save(prefix + "/add", $('#form-employee-add').serialize());
		}
	}
	$("input[name='hiredate']").datetimepicker({
		format: "yyyy-mm-dd hh:ii",
		autoclose: true
	});
</script>
</body>
</html>
